<div class="span10" id="_content" style="background: #fff;margin-left: 2px;">
<table width="100%" style="margin: 0;padding: 0;">
    <tr>
        <td class="hzbar"></td>
        <td style="padding: 10px 15px;">
        <?php echo $this->session->flashdata('_message'); ?>
<!-- Modal Form -->
<?php echo $action; ?>
<?php echo anchor('administrator/article/posts/create','<i class="icon-plus"></i>Add new article','class="btn"'); ?>
<div style="margin-bottom: 15px;"></div>
<?php
if(!empty($article)){
?>
    <table class="table table-striped table-bordered table-condensed">
        <?php 
            foreach($article as $art):
        ?>
        <tr>
            <td><?php echo  $art->post_id ?></td>
            <td><?php
                $posttile = $this->_global->_unserialize($art->post_title);
                echo isset($posttile[$this->session->userdata('lan')]['post_title'])?$posttile[$this->session->userdata('lan')]['post_title']:"Không tồn tại tiêu đề bài viết với ngôn ngữ hiện tại";
                //echo $posttile[$this->session->userdata('lan')]['post_title'];
            ?></td>
            <td><?php 
                $this->load->model('categories','cat');
                $category = $this->cat->getCat(array('cat_id'=>$art->cat_id));
                if(!empty($category)){
                        $category = $this->_global->_unserialize($category->cat_name);
                        echo $category[$this->session->userdata('lan')]['title'];}
                        
             ?></td>
            <td>
            <?php echo anchor('administrator/article/posts/edit/'.$art->post_id,'<i class="icon-edit"></i> Edit', 'class="btn action"') ?>
            </td>
            <td>
                <?php echo anchor('administrator/article/posts/delete/'.$art->post_id,'<i class="icon-remove"></i> Delete', 'class="btn action" onclick="return confirm(\'Do you want to delete this post?\')"') ?>
            </td>
        </tr>
        <?php endforeach; ?>
    </table>
<?php
}else{
    echo '<div class="alert alert-info"><h4 class="alert-heading">Thông báo!</h4>Chưa có bài viết nào...</div>';
}
?>
        </td>
    </tr>
</table>
</div>